package com.pt.site.resource.video;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import com.pt.site.resource.StandardResource;

public class StandardVideo extends StandardResource implements IVideo {

	private final VideoType videoType;
	private final Map<String, String> settings;
	
	public StandardVideo(String title, String description) {
		this(title, description, VideoType.FLASH);
	}
	
	public StandardVideo(String title, String description, VideoType videoType) {
		super(null, null, title, description);
		this.videoType = videoType;
		this.settings = new HashMap<String, String>();
	}
	
	public void addSetting(String key, String value) {
		if (key != null) {
			settings.put(key, value);
		}
	}

	@Override
	public VideoType getType() {
		return videoType;
	}

	@Override
	public String getScreenShotUrl() {
		return settings.get("image");
	}

	@Override
	public Map<String, String> getSettings() {
		return Collections.unmodifiableMap(settings);
	}

}
